@section('content')

<div class="m-story-wrap  m-logo-align">
	<h3 class="">{{$story->title}}</h3>
	<h4 class="">{{$story->subtitle}}</h4>
	<div class="m-parse">
		{{$story->content}}
	</div>
	
	<div class="m-stories-slider">
		<div class="am-slider am-slider-default am-slider-carousel" id="slider">
		  <ul class="am-slides">
		  	@foreach($stories as $s)
		  	<li class="{{$s->id == $story->id ? 'active':''}}">
		  		<a href="{{URL::to('/stories')}}?id={{$s->id}}">
		  			<h5>{{$s->title}}</h5>
			  		<img src="{{Images::url($s->image,225,270)}}" />
			  		<h6>{{$s->subtitle}}</h6>
		  		</a>
		  	</li>
		    @endforeach
		  </ul>
	</div>
	</div>
	
</div>

@stop

@section('script')
{{ HTML::script('assets/js/ueditor/ueditor.parse.min.js') }}
<script type="text/javascript">
<!--
uParse(".m-parse",{
	rootPath:"{{URL::to('/assets/js/ueditor')}}"
})
$(function(){
	$('#slider').flexslider({
			itemWidth: 200,
			maxItems:4,
			slideshow: false,
			controlNav:false,
			itemMargin:16,
			start:function(){
				var index = $(".m-stories-slider li.active").index();
				var count = "{{$stories->count()}}";
				if (index - 3 > 0){
					$('#slider').flexslider(index - 3)
				}
			}
		 
		  // 设置其他参数
		});
	
});
//-->
</script>
@stop
